home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Games / Chess / Source / gnuchess.h < prev    next >
C/C++ Source or Header  |  1994-04-01  |  3KB  |  115 lines

  1. /*
  2.   This file contains code for CHESS.
  3.   Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc.
  4.  
  5.   This file is part of CHESS.
  6.  
  7.   CHESS is distributed in the hope that it will be useful,
  8.   but WITHOUT ANY WARRANTY.  No author or distributor
  9.   accepts responsibility to anyone for the consequences of using it
  10.   or for whether it serves any particular purpose or works at all,
  11.   unless he says so in writing.  Refer to the CHESS General Public
  12.   License for full details.
  13.  
  14.   Everyone is granted permission to copy, modify and redistribute
  15.   CHESS, but only under the conditions described in the
  16.   CHESS General Public License.   A copy of this license is
  17.   supposed to have been given to you along with CHESS so you
  18.   can know your rights and responsibilities.  It should be in a
  19.   file named COPYING.  Among other things, the copyright notice
  20.   and this notice must be preserved on all copies.
  21. */
  22.  
  23.  
  24. /* Header file for GNU CHESS */  
  25.  
  26. #define neutral 2
  27. #define white 0
  28. #define black 1 
  29. #define no_piece 0
  30. #define pawn 1
  31. #define knight 2
  32. #define bishop 3
  33. #define rook 4
  34. #define queen 5
  35. #define king 6
  36. #define pxx " PNBRQK"
  37. #define qxx " pnbrqk"
  38. #define rxx "12345678"
  39. #define cxx "abcdefgh"
  40. #define check 0x0001
  41. #define capture 0x0002
  42. #define draw 0x0004
  43. #define promote 0x0008
  44. #define cstlmask 0x0010
  45. #define epmask 0x0020
  46. #define exact 0x0040
  47. #define pwnthrt 0x0080
  48. #define maxdepth 30
  49. #define true 1
  50. #define false 0
  51.  
  52. #ifdef NeXT_MOD
  53. extern short winner;
  54. struct MoveInfo {
  55.   short side;
  56.   short alpha;
  57.   short beta;
  58.   short iop;
  59.   short rpt;
  60. };
  61. #endif
  62.  
  63. struct leaf
  64.   {
  65.     short f,t,score,reply;
  66.     unsigned short flags;
  67.   };
  68. /* Glenn Reid (NeXT) Mon Apr 16 00:41:29 PDT 1990
  69.    added the "queenhood" field to GameRec to notice when
  70.    a pawn is turned into a queen so that Undo can work
  71. */
  72. struct GameRec
  73.   {
  74.     unsigned short gmove;
  75.     short score,depth,time,piece,color;
  76.     long nodes;
  77.   };
  78. /*     short queenhood;  */
  79.  
  80. struct TimeControlRec
  81.   {
  82.     short moves[2];
  83.     long clock[2];
  84.   };
  85. struct BookEntry
  86.   {
  87.     struct BookEntry *next;
  88.     unsigned short *mv;
  89.   };
  90.  
  91. extern char mvstr1[5],mvstr2[5];
  92. extern struct leaf Tree[2000],*root;
  93. extern short TrPnt[maxdepth],board[64],color[64];
  94. extern short row[64],column[64],locn[8][8];
  95. extern short atak[2][64],PawnCnt[2][8];
  96. extern short castld[2],kingmoved[2];
  97. extern short c1,c2,*atk1,*atk2,*PC1,*PC2;
  98. extern short mate,post,opponent,computer,Sdepth,Awindow,Bwindow,dither;
  99. extern long ResponseTime,ExtraTime,Level,et,et0,time0,cputimer,ft;
  100. extern long NodeCnt,evrate,ETnodes,EvalNodes,HashCnt;
  101. extern short quit,reverse,bothsides,hashflag,InChk,player,force,easy,beep,meter;
  102. extern short timeout,xwndw;
  103. extern struct GameRec GameList[240];
  104. extern short GameCnt,Game50,epsquare,lpost,rcptr,contempt;
  105. extern short MaxSearchDepth;
  106. extern struct BookEntry *Book;
  107. extern struct TimeControlRec TimeControl;
  108. extern short TCflag,TCmoves,TCminutes,OperatorTime;
  109. extern short otherside[3];
  110. extern short Stboard[64];
  111. extern short Stcolor[64];
  112. extern unsigned short hint,PrVar[maxdepth];
  113.  
  114. #define HZ 60
  115.